package com.ny.Map;

import java.util.HashMap;
import java.util.Map;

public class TestMap {
    public static void main(String[] args) {
        Map<String, Integer> idMap = new HashMap<>();
        Map<String, String> nameMap = new HashMap<>();
        Map<String, Integer> ageMap = new HashMap<>();

        idMap.put("艹日大大可", 101);
        idMap.put("苏火山", 10002);
        idMap.put("孙绍木水", 10003);

        nameMap.put("艹日大大可", "艹日大大可");
        nameMap.put("苏火山", "苏火山");
        nameMap.put("孙绍木水", "孙绍木水");

        ageMap.put("艹日大大可", 20);
        ageMap.put("苏火山", 20);
        ageMap.put("孙绍木水", 21);

        printEmployeeInfo(idMap, nameMap, ageMap, "艹日大大可");
        printEmployeeInfo(idMap, nameMap, ageMap, "苏火山");
        printEmployeeInfo(idMap, nameMap, ageMap, "孙绍木水");
    }

    private static void printEmployeeInfo(Map<String, Integer> idMap,
                                          Map<String, String> nameMap,
                                          Map<String, Integer> ageMap,
                                          String key) {
        System.out.printf("ID: %d, Name: %s, Age: %d%n",
                idMap.get(key),
                nameMap.get(key),
                ageMap.get(key));
    }
}